package com.nuanshui.heatedloan.search.facade.model;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * Created by zxh on 2017/2/7.
 */
@Service
public class ElasticSearchConfig {

    private static final String CLUSTER_NAME = "elasticsearch";
    //private static final String ELASTIC_SERVER_HOST = "118.178.123.13";//正式的
    private static final String ELASTIC_SERVER_HOST = "118.178.182.244";//科博汇正式
    //  private static final String ELASTIC_SERVER_HOST = "10.0.0.254";
    private static final int ELASTIC_SERVER_PORT = 9300;
    private static final int ELASTIC_INDEX_PORT = 9200;


    @Value("${elasticsearch.cluster.name}")
    private String clusterName=CLUSTER_NAME;

    @Value("${elasticsearch.server.host}")
    private String serverHost=ELASTIC_SERVER_HOST;

    @Value("${elasticsearch.server.port}")
    private Integer serverPort=ELASTIC_SERVER_PORT;

    @Value("${elasticsearch.index.port}")
    private Integer indexPort=ELASTIC_INDEX_PORT;

    public String getClusterName() {
        return clusterName;
    }

    public void setClusterName(String clusterName) {
        this.clusterName = clusterName;
    }

    public String getServerHost() {
        return serverHost;
    }

    public void setServerHost(String serverHost) {
        this.serverHost = serverHost;
    }

    public Integer getServerPort() {
        return serverPort;
    }

    public void setServerPort(Integer serverPort) {
        this.serverPort = serverPort;
    }

    public Integer getIndexPort() {
        return indexPort;
    }

    public void setIndexPort(Integer indexPort) {
        this.indexPort = indexPort;
    }
}
